package demandsystem

type PageQ struct {
	Ok   bool `json:"ok"`
	Size int  `form:"size" json:"size"`
	Page int  `form:"page" json:"page"`
	Data any  `json:"data"`
}

type ResourceSearchQ struct {
	Resource
	PageQ
	FromTime int64  `form:"from_time" json:"from_time"` //搜索开始时间
	ToTime   int64  `form:"to_time" json:"to_time"`     //搜索结束时候
	Order    string `form:"order" json:"order"`         //排序字段
}

type NodeRequest struct {
	RID        string `json:"r_id"`
	NodeID     uint   `json:"node_id"`
	RegionCode string `json:"region_code"`
}

type UploadStatusRequest struct {
	NodeRequest
	Status     int16  `json:"status"`
	URL        string `json:"url"`
	Resolution string `json:"resolution"`
}

type UploadFileInfoRequest struct {
	NodeRequest
	FileInfo
}

type UploadVideoInfoRequest struct {
	NodeRequest
	VideoInfo
}

type UploadCoverRequest struct {
	NodeRequest
	CoverUrl string `json:"cover_url"`
}

type UploadOssFileinfoRequest struct {
	OssFileInfo
	IsCover bool
}

type UploadOrginFileinfoRequest struct {
	NodeRequest
	OrginInfoList []OrginInfo `json:"orgin_fileinfo_list"`
}

type OrginInfo struct {
	RegionCode string `json:"region_code"`
	Url        string `json:"url"`
	VolumeNum  uint64 `json:"volume_num"`
}

type DistributeMissionRequest struct {
	RID             string        `json:"r_id"`
	MissionID       uint          `json:"mission_id"`
	PlayUrl         PlayUrl       `json:"play_url"`
	OssFileInfoList []OssFileInfo `json:"ossfile_list"`
}

type MissionCompleteRequest struct {
	NodeRequest
	MissionID uint `json:"mission_id"`
	IsUpload  bool `json:"is_upload"`
}

type UploadCompressInfoRequest struct {
	NodeRequest
	CompressInfo
}
